-- GENERATED SPELL FOR [Priestess of Dementia] --


function spell0_22957(pUnit, Event) --@Confusion,n/a--
pUnit:FullCastSpellOnTarget(41397,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22957', 4302, 1)
end

function spell1_22957(pUnit, Event) --@Dementia,n/a--
pUnit:FullCastSpellOnTarget(41404,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22957', 30000, 1)
end

function Sorts_22957(pUnit, Event)
local choix_sorts_22957 = math.random(0, 1)
if choix_sorts_22957 == 0 then
pUnit:RegisterEvent('spell0_22957', 1, 1)
end
if choix_sorts_22957 == 1 then
pUnit:RegisterEvent('spell1_22957', 1, 1)
end
end

function mob22957_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22957', math.random(1500, 3000), 1)
end

function mob22957_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22957_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22957_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22957, 1, 'mob22957_Action')
RegisterUnitEvent(22957, 2, 'mob22957_Leave')
RegisterUnitEvent(22957, 3, 'mob22957_Kill')
RegisterUnitEvent(22957, 4, 'mob22957_Die')
